﻿Imports System.Data.SqlClient
Imports System.Configuration
Imports System.Data
Partial Class Cumpleanos
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim cnn As New SqlConnection(ConfigurationManager.ConnectionStrings("cnConex").ConnectionString)
        Dim cmd As New SqlCommand
        Dim dt As New DataTable
        Dim html As String = ""
        cnn.Open()
        cmd.Connection = cnn
        cmd.CommandType = Data.CommandType.StoredProcedure
        cmd.CommandText = "sp_CumpleanosPoderosaWebpart"
        dt.Load(cmd.ExecuteReader())
        For Each dr As DataRow In dt.Rows
            html += "<p>" & dr("Nombre") & "<br><b>" & dr("Departamento") & "</b><br><b>" & dr("Empresa") & "</b></p>"
        Next
        html = "<marquee direction=""up"" scrollAmount=""2"" width=""210"" height=""106"">" & html & "</marquee>"
        Dim lt As LiteralControl = New LiteralControl(html)
        pnlCuerpo.Controls.Add(lt)
    End Sub
End Class
